package cn.ligoo.part.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.ligoo.part.dao.DeptInfoDao;
import cn.ligoo.part.domain.DeptInfo;
import cn.ligoo.part.service.DeptInfoService;

/**
 * @author Jin,QingHua
 * @version 2013-10-23 13:11:20
 */
@Service
public class DeptInfoServiceImpl implements DeptInfoService {

	@Resource
	private DeptInfoDao deptInfoDao;

	@Override
	public Long createDeptInfo(DeptInfo t) {
		this.deptInfoDao.insertEntity(t);
		return t.getId(); // ע��MyBatis��insert��iBATIS��ͬ��
	}

	@Override
	public int modifyDeptInfo(DeptInfo t) {
		return this.deptInfoDao.updateEntity(t);
	}

	@Override
	public int removeDeptInfo(DeptInfo t) {
		return this.deptInfoDao.deleteEntity(t);
	}

	@Override
	public DeptInfo getDeptInfo(DeptInfo t) {
		return this.deptInfoDao.selectEntity(t);
	}

	@Override
	public Long getDeptInfoCount(DeptInfo t) {
		return this.deptInfoDao.selectEntityCount(t);
	}

	@Override
	public List<DeptInfo> getDeptInfoList(DeptInfo t) {
		return this.deptInfoDao.selectEntityList(t);
	}

}
